import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router'
import MyHome from './components/MyHome.vue'
import MyRent from './components/MyRent.vue'
import MyInformation from './components/MyInformation.vue'
import MyMine from './components/MyMine.vue'
import RentDetail from './components/RentDetail.vue'

Vue.config.productionTip = false
Vue.use(VueRouter)

const router = new VueRouter({
  mode: 'history', 
  routes:[
    {path:'/', redirect: '/home'},
    {path:'/home', component: MyHome},
    {path: '/rent',component: MyRent},
    {path:'/info',component: MyInformation},
    {path:'/mine',component:MyMine},
    {path:'/detail/:name?', component: RentDetail,meta: { hideNavbar: true }},
  ]
})

new Vue({
  render: h => h(App),
  router
}).$mount('#app')
